package org.iteam.commons.utils;

import org.iteam.commons.utils.uuid.UUID;

/**
 * PK生成器
 * 
 * @author jacky
 * 
 */
public class PkGenerator {
	public static String GenUUID() {
		return GenUUID(true);
	}

	public static String GenUUID(boolean separator) {
		UUID uuid = new UUID();
		if (separator)
			return uuid.toString().toUpperCase();
		else
			return uuid.toString().replaceAll("-", "").toUpperCase();
	}

	/**
	 * 获得uuid
	 * 
	 * @param separator
	 *            分隔符
	 * @return
	 */
	public static String GenUUID(String separator) {
		return new UUID().toString().replaceAll("-", separator).toUpperCase();
	}
}
